<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/css/shopping.css">
</head>
<body>

        <header>
           
        </header>
        <main>
            <section>
                <div class="shoppingMain">
                    <div class="shopping" id="shopping">
                      <table cellspacing="0" cellpadding="0">
                        <thead class="header-nav">
                            <tr>
                                <th width="160px">
                                    <a href="javascript:;" id="edit">全选</a>
                                    <input type="checkbox" id="all-check">
                                </th>
                                <th width="310px">商品名称</th>
                                <th width="200px"></th>
                                <th width="90px">购买数量</th>
                                <th width="200px">单价</th>
                                <th width="200px">小计</th>
                            </tr>
                        </thead>
                        <tbody class="cart-things" id="cart-things">
                          
                        </tbody>
                        <tfoot class="cart-money">
                          <tr>
                              <td width="190px">
                                  <input type="checkbox" id="selectAllBox" checked/>
                                  <p id="All">
                                      <a href="javaScript:;" id="clearAll">删除/</a>
                                      <a href="javaScript:;" id="cancel">取消编辑</a>
                                  </p>
                              </td>
                              <td width="800px">
                                  <span>合计：</span>
                                  <em>￥</em>
                                  <span id="Paymoney"></span>
                              </td>
                              <td width="180px">
                                  <a href="/html/submitorder.html" id="indent">提交订单</a>
                              </td>
                          </tr>
                        </tfoot>
                      </table>
                      <script type="text/html" id="cartTemplate">
                        {{each cart shop}}
                        <tr data-id="{{shop.id}}">
                          <td>
                            <label class="change-check">
                              <input type="checkbox" class="checks" {{ shop.checked && 'checked' }}/>
                              <span class="check-span">
                                <span class="check-title"></span>
                              </span>
                            </label>
                          </td>
                          <td>
                            <a href="/html/detail.html?id={{shop.id}}">
                              <img src="{{shop.imgs[0]}}" alt="">
                            </a>
                            <span>{{shop.title}}</span>
                          </td>
                          <td>
                            <span>{{shop.originPrice}}</span>
                          </td>
                          <td>
                            <a href="javaScript:;" class="minus">-</a>
                            <input type="text" value="{{shop.count}}">
                            <a href="javaScript:;" class="plus">+</a>
                          </td>
                          <td>{{shop.price}}</td>
                          <td>{{(shop.price*shop.count).toFixed(2)}}</td>
                        </tr>
                        {{/each}}
                      </script>
                    </div>
                    <div class="donBuy" id="donBuy">
                        <p class="logo-a"><img src="/images/logo-a.jpg" alt=""></p>
                        <div class='donBuy-a'>
                            <em>您的购物车还是空的</em>
                            <a href="/">马上去购物</a>
                        </div>
                        
                    </div>
                </div>
            </section>
        </main>
         
        <footer>
        </footer>
        <script src="/libs/require/require.min.js" data-main="/js/shopping.js"></script>
</body>
</html>